package com.xprime.mobileFramework.file;

import com.adobe.fre.FREContext;
import com.adobe.fre.FREFunction;
import com.adobe.fre.FREInvalidObjectException;
import com.adobe.fre.FREObject;
import com.adobe.fre.FRETypeMismatchException;
import com.adobe.fre.FREWrongThreadException;

public class FileOpenExtension implements FREFunction {

	@Override
	public FREObject call( FREContext pFREContext, FREObject[] arg1 ) 
	{
		
		FileOpen fo = new FileOpen();
		
		try{
			fo.open(pFREContext.getActivity(), arg1[0].getAsString(), arg1[1].getAsString(), pFREContext );
		} catch (FRETypeMismatchException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (FREInvalidObjectException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (FREWrongThreadException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    
		return null;
	}

}
